# -*- coding: utf-8 -*-
'''
 同一个动能的多个状态
 子类中重写父类方法

'''

class Parent(object):
    def talk(self):
        print('林在学习')

class Child(Parent):
    def run(self):
        print("林在奔跑")
    # 重写
    def talk(self):
        print('小林在说话')



if __name__ == '__main__':
    c = Child()
    c.run()
    c.talk()
    f = Parent()
    f.talk()

